#!/bin/sh

X_SRCDIR=${X_SRCDIR:="/home/adrian/work/freebsd/stable/9/src/"}
X_KERNDIR=${X_KERNDIR:="/home/adrian/work/freebsd/stable/9/src/sys/i386/compile/MARILYN-9-STABLE"}
X_KMODOWN=${X_KMODOWN:="adrian"}
X_KMODGRP=${X_KMODGRP:="adrian"}

# This allows for -HEAD includes for net80211 ..
env CFLAGS="-I../../../sys/" \
make \
	MODULES_OVERRIDE="wlan wlan_acl wlan_amrr wlan_ccmp wlan_rssadapt wlan_tkip wlan_wep wlan_xauth bwn wi iwn usb" \
	DEBUG_FLAGS="-g" \
	DEBUG_FLAGS="-g" \
	KMODDIR="../../../../modules/" \
	KMODOWN="${X_KMODOWN}" \
	KMODGRP="${X_KMODGRP}" \
	MAKESYSPATH="${X_SRCDIR}/share/mk" \
	SYSDIR="${X_SRCDIR}/sys/" \
	KERNBUILDDIR="${X_KERNDIR}" \
	$@
